<!doctype html>
<html>
<head>
<meta charset="utf-8">
<link href="{%$URL%}style/webstyle.css" rel="stylesheet" type="text/css" />
<title>{%$web_name%}</title>

</head>
<link href="{%$URL%}mx.ico" rel="shortcut icon"/>
<script src="{%$URL%}jquery-1.7.1.min.js"></script>
<script src="{%$URL%}defalut.js"></script>
<script type="text/javascript">
function newgdcode(obj,url) {
  obj.src = url+ '&nowtime=' + new Date().getTime();//后面传递一个随机参数，否则在IE7和火狐下，不刷新图片
}
/*提交信息检查*/
  function checkinfo(){
    var lc_title=$("#lc_title").val();//会员名
    var lc_password=$("#lc_password").val();//密  码
    var lc_password2=$("#lc_password2").val();//确认密码
    var lc_name=$("#lc_name").val();//真实姓名
    var yzm=$("#yzm").val();//验证码
    
    if(!lc_title){
      msg_tips("亲，会户名不能为空！","");
      return false;
      }
    if(!lc_password){
      msg_tips("亲，密码不能为空！","");
      return false;
      }
    if(!lc_password2){
      msg_tips("亲，确认密码不能为空！","");
      return false;
      }
    if(lc_password!==lc_password2){
      msg_tips("亲，密码和确认密码不相同！","");
      return false;
      }
    if(!lc_name){
      msg_tips("亲，真实姓名不能为空！","");
      return false;
      }
    if(!yzm){
      msg_tips("亲，验证码不能为空！","");
      return false;
      }
    }
/*提交信息检查 End*/
/*输入信息检查*/
  function check_lc_title(){
    var lc_title=$("#lc_title").val();
    if(!lc_title){
      $("#lc_title_tips").text("会员名不能为空！").css("color","#F00");
      }else{
        $.post("index.php?a=user_name_ajax",{lc_user:lc_title,action:"2"},function(data){
          if(data){
            if(data=="正确"){
              $("#lc_title_tips").text("会员名可用！").css("color","#060");
              }
            if(data=="已存在"){
              $("#lc_title_tips").text("会员名已存在！").css("color","#F00");
              }
            }
          });
        }
    }
  function check_lc_password(){
    var lc_password=$("#lc_password").val();
    if(!lc_password){
      $("#lc_password_tips").text("密码不能为空！").css("color","#F00");
      }else{
        $("#lc_password_tips").text("");
        }
    }
  function check_lc_password2(){
    var lc_password2=$("#lc_password2").val();
    var lc_password=$("#lc_password").val();
    if(!lc_password2){
      $("#lc_password2_tips").text("密码不能为空！").css("color","#F00");
      }else{
        if(lc_password!=lc_password2){
          $("#lc_password2_tips").text("密码和确认密码不相同！").css("color","#F00");
          }else{
            $("#lc_password2_tips").text("密码正确！").css("color","#060");
            }
        }
    }
  function check_lc_name(){
    var lc_name=$("#lc_name").val();
    if(!lc_name){
      $("#lc_name_tips").text("真实姓名不能为空！").css("color","#F00");
      }
    }
/*输入信息检查 End*/
</script>
<body>
  <!--头部 开始-->
{%include file='head.htm'%}
<!--头部 结束--> 
<!--内容 开始-->
<div class="nr" style="padding:0 0 40px 0;">
  <div class="main_title"> <span class="main_t">会员中心</span><br>
    <!-- Wonderful Case  --></div>
  <div style="padding:40px 0 0 0;">
    <div class="main_l">
      <div class="main_l_title"><span style="font-size:22px;">栏目分类</span><br>
        <!-- Wonderful case --></div>
      <div class="main_l_list">
        <ul>
          <li><a href="index.php?p=user">会员信息</a></li>
          <li><a href="index.php?p=shoppingcart_list">购物车</a></li>
          <li><a href="index.php?p=dingdan_list">订单管理</a></li>
          <li><a href="index.php?p=user_zt">高级会员</a></li>
          <li><a href="index.php?a=user_exit">退出会员</a></li>
        </ul>
      </div>
    </div>
    <div class="main_r">
    <div class="main_ly">
      <ul>
          <form method="post" action="index.php?a=user_reg" onsubmit="return checkinfo()">
          <input name="lanmu" type="hidden" value="{%$smarty.get.lanmu%}">
          <li>
            <div class="main_ly_t1" style="width:90px;">会员名：</div>
            <input name="lc_user" type="text" required id="lc_title" onblur="check_lc_title()" class="main_bd">
            <div class="main_ly_t2">&nbsp;&nbsp;<span id="lc_title_tips">*</span></div>
            <div class="cl"></div>
          </li>
          <li>
            <div class="main_ly_t1" style="width:90px;">密&nbsp;&nbsp;码：</div>
            <input name="lc_password" type="password" required id="lc_password" onblur="check_lc_password()" class="main_bd">
            <div class="main_ly_t2">&nbsp;&nbsp;<span id="lc_password_tips">*</span></div>
            <div class="cl"></div>
          </li>
          <li>
            <div class="main_ly_t1" style="width:90px;">确认密码：</div>
            <input name="lc_password2" type="password" required id="lc_password2" onblur="check_lc_password2()" class="main_bd">
            <div class="main_ly_t2">&nbsp;&nbsp;<span id="lc_password2_tips">*</span></div>
            <div class="cl"></div>
          </li>
          <li>
            <div class="main_ly_t1" style="width:90px;">真实姓名：</div>
            <input name="lc_name" type="text" required id="lc_name" onblur="check_lc_name()" class="main_bd">
            <div class="main_ly_t2">&nbsp;&nbsp;<span id="lc_name_tips">*</span></div>
            <div class="cl"></div>
          </li>
          <li>
            <div class="main_ly_t1" style="width:90px;">联系电话：</div>
            <input name="lc_tel" type="text" id="lc_tel" class="main_bd">
            <div class="main_ly_t2">&nbsp;&nbsp;<span id="lc_tel_tips"></span></div>
            <div class="cl"></div>
          </li>
          <li>
            <div class="main_ly_t1" style="width:90px;">电子邮箱：</div>
            <input name="lc_email" type="text" id="lc_email" class="main_bd">
            <div class="main_ly_t2">&nbsp;&nbsp;<span id="lc_email_tips"></span></div>
            <div class="cl"></div>
          </li>
          <li>
            <div class="main_ly_t1" style="width:90px;">验证码：</div>
            <input type="text" name="yzm" id="yzm" class="main_bd2">
            <a style="float:left;margin:0 0 0 10px;"><img src="index.php?a=imagecode" alt="看不清楚，换一张" align="absmiddle" style="cursor:pointer;margin-bottom:3px;" onClick="newgdcode(this,this.src)"></a>
            <div class="cl"></div>
          </li>
          <li>
            <input type="submit" id="tijiao" style="margin-left:30px; height:35px; width:100px; border:0px; font-size:16px; background:#487CE1; color:#FFF;" value="注册">&nbsp;&nbsp;&nbsp;
            <input type="reset" id="chongzhi" style="margin-left:30px; height:35px; width:100px; border:0px; font-size:16px;"  value="重置">
          </li>
          </form>
        </ul>
  </div>
  </div>
</div>
    <!-- right -->
    <div class="clear"></div>
  </div>
  {%include file="bot.htm"%}</div>
<!-- body --> 
<br>
<br>
</body>
</html>
